package org.qydjk.common.vo;

public class HibernatePage {
    private int currPage = 1;//当前页，从1开始
    private int pageSize = 10;//每一页的大小
    private int start = 0;//当前页的起始数据

    public HibernatePage() {
    }

    public HibernatePage(int currPage, int pageSize) {
        this.pageSize = pageSize;
        if(currPage <= 0){
            this.currPage = 1;
            start = (this.currPage - 1) * pageSize;
        }else{
            this.currPage = currPage;
            start = (this.currPage - 1) * pageSize;
        }
    }

    public int getCurrPage() {
        return currPage;
    }

    public void setCurrPage(int currPage) {
        this.currPage = currPage;
    }

    public int getPageSize() {
        return pageSize;
    }

    public void setPageSize(int pageSize) {
        this.pageSize = pageSize;
    }

    public int getStart() {
        return start;
    }

    public void setStart(int start) {
        this.start = start;
    }
}
